﻿using System;

namespace jsonar
{
	internal struct Field
	{
		internal string Name;
		internal Json Value;
		internal int Hash;
		internal int Next;

		public override string ToString()
		{
			if (this.Name == null || this.Name.Length < 1 || this.Value == null) return null;
			return string.Concat("\"", this.Name, "\":", this.Value.ToString());
		}
		public string ToHtml()
		{
			if (this.Name == null || this.Name.Length < 1 || this.Value == null) return null;
			return string.Concat("\"", this.Name, "\":", this.Value.toHtml());
		}
	}
}
